#pragma once
/* 
* COPYRIGHT 2012 Mafahir Fairoze
* 
* This file is part of Vector Template Library (Vtl) v1.0.
* (Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)
* 
* Vector Template Library (Vtl) v1.0 is a free software. You can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
* 
* Vector Template Library (Vtl) v1.0 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License <http://www.gnu.org/licenses/> for more details.
*/

#include "Vtl/eigen.h"

namespace Vtl
{
	namespace angles
	{
		/*!
		*  \brief Converts radians to degrees.
		*  \param[in] _Alpha angle in radians.
		*  \return Scalar returns the converted angle in degrees.
		*/
		template <typename Scalar>
		inline Scalar rad2deg(const Scalar &_Alpha);

		/*!
		*  \brief Converts degrees to radians.
		*  \param[in] _Alpha angle in degrees.
		*  \return Scalar returns the converted angle in radians.
		*/
		template <typename Scalar>
		inline Scalar deg2rad(const Scalar &_Alpha);

		/*!
		*  \brief Normalizes the angle between [-PI to PI].
		*  \note normAngle(PI) returns -PI and normAngle(-PI) returns PI.
		*  \param[in] _Alpha angle in radians.
		*  \return Scalar returns the normalized angle
		*/
		template <typename Scalar>
		inline Scalar normAngle(const Scalar &_Alpha);

		/*!
		*  \brief Returns the angle between two vectors.
		*  \param[in] _V1 
		*  \param[in] _V2 
		*  \return Scalar returns the angle in radians.
		*/
		template <typename Scalar, int Dimension>
		inline Scalar getAngle(const Eigen::Matrix<Scalar,Dimension,1> &_V1,
			const Eigen::Matrix<Scalar,Dimension,1> &_V2);

		/*!
		*  \brief Returns the direction of the vector along the [i, j] plane.
		*  \note (i,j,k) [0,1,0] returns the direction 0 in clockwise.
		*  \param[in] _Vect 
		*  \return Scalar returns the direction in radians.
		*/
		template <typename Scalar, int Dimension>
		inline Scalar getDirection(const Eigen::Matrix<Scalar,Dimension,1> &_Vect);

		/*!
		*  \brief Returns the elevation angle between the vector and the [i,j] plane.
		*  \param[in] _Vect 
		*  \return Scalar returns the elevation in radians.
		*/
		template <typename Scalar, int Dimension>
		inline Scalar getElevation(const Eigen::Matrix<Scalar,Dimension,1> &_Vect);
	};

};

#include "Vtl/impl/angles.hpp"